import { createApp } from 'vue'
import App from './App.vue'
// 引入路由
import router from "./router"
// 引入全局的less文件
import "./assets/global.less"
import "./assets/el-reset.less"
// 引入Pinia
import { createPinia } from 'pinia'
// 引入elementui
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
//路由钩子
import "./utils/routerHook"
// 引入持久存储的插件
import piniaPluginPersistedstate from "pinia-plugin-persistedstate" 
//引入nprogress插件 

import 'nprogress/nprogress.css'
let pinia = createPinia()
// 使用持久性存储插件
pinia.use(piniaPluginPersistedstate)
let app = createApp(App)
//将router注入到app每一个子组件里面
app.use(router)
// app.use(createPinia())
app.use(pinia)
// 使用elementui
app.use(ElementPlus)
app.mount('#app')
